Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: XPages and Java
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Functionality
Platform: Windows XP client
Release: 8.5
Reproducible: Always

Simply put:

facesContext.getResponseStream() returns null.

facesContext.getReponse().getOutputStream() throws the following exception:
java.lang.IllegalStateException: Can't get an OutputStream while a Writer is already in use

So I cannot see any way of getting an Stream rather than a Writer.

I was trying to get Ed Wissels technique to work to allow xpages to return binary as this is something I would dearly like to have for my current project. I can't see how it's possible.

I also have a problem with any xpage Java placed in WebContent/WEB_INF being cached permanently and needing a server restart.

Anyone have any experience with the ResponseStream objects? The ResponseWriter works fine but handles only text.

No love for xpages yet!

S

EDIT: I am using this code in the afterRenderReponse event.

var rs = facesContext.getResponseStream();
var rw = facesContext.getResponseWriter();
if(rs == null ) {
rw.write("stream == null");
} else {
rw.write("we have a stream");
}

Always outputs stream == null

Sounds to me like the xpage system is always instantiating the PrintWriter object even when all rendering is turned off and this blocks any attempt at getting at the OutputStream.

I have tried closing/flushing/ending/null'ing the ResponseWriter object, but nothing seems to work.


Feedback number WEBB7RS34C created by ~George Chugeroveroden on 05/06/2009

Status: Open
Comments:

XPages and Java (~George Chugero... 6.May.09)
. . I don't think you can get both a wr... (~Ted Xanjumilyo... 7.May.09)
. . . . No joy (~George Chugero... 8.May.09)
. . . . . . It's sad (~Ted Xanjumilyo... 10.May.09)
. . . . . . . . Agreed (~George Chugero... 11.May.09)
. . . . . . . . . . In case this isn't totally buried..... (~George Chugero... 12.May.09)
. . . . . . . . . . . . Have you a solution? (~Howard Cisluma... 9.Feb.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS